package Cheetah

type Callback func(elp *Elp)

//加载所有的控制器

var Controllers map[string]Usercallback = make(map[string]Usercallback)

type Usercallback struct {
	call   Callback
	method string
}

type DispController struct {
}

func (disp DispController) addController(route string, call Usercallback) {

	Controllers[route] = call
}

func (disp DispController) GetCallback(url string, methon string) Usercallback {
	if v, ok := Controllers[url]; ok {
		if methon == v.method {

			return v
		}
	}
	return caback404
}
